﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VideoClub.DS.classes.sp;
using VideoClub.EN.classes;

namespace VideoClub.BS.classes
{
   public class Bs_Mod
    {
         Sp_Mod_Handler spmodhandle = new Sp_Mod_Handler();
        public int modActor(Actor actor, ref string log)
        {
            try
            {
                int rowsaffected = 0;
                rowsaffected = spmodhandle.modActor(actor, ref log);
                log += rowsaffected;
                return rowsaffected;
            }
            catch (Exception ex)
            {
                log += ex.Message + ex.StackTrace + ex.Source;
                throw ex;
            }
        }

        public int modCategoriaPeli(CategoriaPelicula categoriapelicula, ref string log)
        {
            try
            {
                int rowsaffected = 0;
                rowsaffected = spmodhandle.modCategoriaPeli(categoriapelicula, ref log);
                log += rowsaffected;
                return rowsaffected;

            }
            catch (Exception ex)
            {
                log += ex.Message + ex.StackTrace + ex.Source;
                throw ex;
            }
        }



        public int modNacionalidad(Nacionalidad nacionalidad, ref string log)
        {
            try
            {
                int rowsaffected = 0;
                rowsaffected = spmodhandle.modNacionalidad(nacionalidad, ref log);
                log += rowsaffected;
                return rowsaffected;

            }
            catch (Exception ex)
            {
                log += ex.Message + ex.StackTrace + ex.Source;
                throw ex;
            }
        }


        public int modPelicula(Pelicula pelicula, ref string log)
        {
            try
            {
                int rowsaffected = 0;
                rowsaffected = spmodhandle.modPelicula(pelicula, ref log);
                log += rowsaffected;
                return rowsaffected;

            }
            catch (Exception ex)
            {
                log += ex.Message + ex.StackTrace + ex.Source;
                throw ex;
            }
        }




        public int modPeliImgFile(PeliImageFile peliimgfile, ref string log)
        {
            try
            {
                int rowsaffected = 0;
                rowsaffected = spmodhandle.modPeliImgFile(peliimgfile, ref log);
                log += rowsaffected;
                return rowsaffected;

            }
            catch (Exception ex)
            {
                log += ex.Message + ex.StackTrace + ex.Source;
                throw ex;
            }
        }


        public int modSolicitud(Solicitud solicitud, ref string log)
        {
            try
            {
                int rowsaffected = 0;
                rowsaffected = spmodhandle.modSolicitud(solicitud, ref log);
                log += rowsaffected;
                return rowsaffected;

            }
            catch (Exception ex)
            {
                log += ex.Message + ex.StackTrace + ex.Source;
                throw ex;
            }
        }

        public int modTipoUsuario(TipoUsuario tipousuario, ref string log)
        {
            try
            {
                int rowsaffected = 0;
                rowsaffected = spmodhandle.modTipoUsuario(tipousuario, ref log);
                log += rowsaffected;
                return rowsaffected;

            }
            catch (Exception ex)
            {
                log += ex.Message + ex.StackTrace + ex.Source;
                throw ex;
            }
        }


        public int modUsuario(Usuario usuario, ref string log)
        {
            try
            {
                int rowsaffected = 0;
                rowsaffected = spmodhandle.modUsuario(usuario, ref log);
                log += rowsaffected;
                return rowsaffected;

            }
            catch (Exception ex)
            {
                log += ex.Message + ex.StackTrace + ex.Source;
                throw ex;
            }
        }


        public int modvideoPelicula(VideoPelicula videopelicula, ref string log)
        {
            try
            {
                int rowsaffected = 0;
                rowsaffected = spmodhandle.modvideoPelicula(videopelicula, ref log);
                log += rowsaffected;
                return rowsaffected;

            }
            catch (Exception ex)
            {
                log += ex.Message + ex.StackTrace + ex.Source;
                throw ex;
            }
        }

    }
}
